Skip to content

GH-146128: Fix AArch64 multi-instruction constants and relocations#148598

Merged
markshannon merged 1 commit intopython:mainfrom
markshannon:fix-33rx-relocations
Apr 16, 2026
Merged

GH-146128: Fix AArch64 multi-instruction constants and relocations#148598
markshannon merged 1 commit intopython:mainfrom
markshannon:fix-33rx-relocations

Conversation

@markshannon
Copy link
Copy Markdown
Member

@markshannon markshannon commented Apr 15, 2026

  • Elimates rendundant orr xN, xN, 0xffff after 16 or 32 bit loads
  • Merges adrp (21rx) and ldr (12) relocations into single 33rx relocation, when safe to do so.

This differs from the original patching (removed in #146263), as it:

  • does not straddle basic block boundaries (doing so would be unsafe)
  • can handle adrp xN ldr xN pairs that are non-adjacent, even interleaved with other adrp ldr pairs.

* Elimates rendundant orr xN, xN, 0xffff after 16 or 32 bit loads
* Merges adrp (21rx) and ldr (12) relocations into single 33rx relocation, when safe to do so.
Copy link
Copy Markdown
Contributor

@diegorusso diegorusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already reviewed these changes internally. LGTM

@markshannon markshannon merged commit cecf564 into python:main Apr 16, 2026
85 of 86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants